<template>
  <div>
    <el-alert :title="totalNumber" type="info" show-icon :closable="closable">
    </el-alert>
    <!-- 题库列表 -->
    <div class="text item">
      <el-table :data="tableData" style="width: 100%">
        <el-table-column
          prop="number"
          label="试题编号"
          width="180"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="subject"
          label="学科"
          width="180"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="direction"
          label="目录"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="questionType"
          label="题型"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="question"
          label="题干"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="addDate"
          label="录入时间"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="difficulty"
          label="难度"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="creator"
          label="录入人"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="chkState"
          label="审核状态"
          header-align="center"
          align="center"
        >
        </el-table-column
        ><el-table-column
          prop="chkRemarks"
          label="审核意见"
          header-align="center"
          align="center"
        >
        </el-table-column
        ><el-table-column
          prop="chkUser"
          label="审核人"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="publishState"
          label="发布状态"
          header-align="center"
          align="center"
        >
        </el-table-column>
        <el-table-column label="操作" header-align="center" align="center">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="primary"
              icon="el-icon-edit"
              plain
              circle
              style="width: 36px; height: 36px"
              @click="handleEdit(scope.row)"
            ></el-button>
            <el-button
              size="mini"
              type="warning"
              icon="el-icon-close"
              plain
              circle
              style="width: 36px; height: 36px"
              @click="handleBan(scope.row)"
            ></el-button>
            <el-button
              size="mini"
              type="danger"
              icon="el-icon-delete"
              plain
              circle
              style="width: 36px; height: 36px"
              @click="handleDelete(scope.row)"
            ></el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  name: 'my_tables',
  props: { tableData: Array, total: Number },
  data () {
    return {}
  },
  methods: {},
  mounted () {},
  watch: {},
  computed: {
    totalNumber () {
      return `数据一共 ${this.total} 条`
    }
  }
}
</script>

<style scoped lang="less"></style>
